package sunyu.service.impl;

import org.springframework.stereotype.Service;
import sunyu.mapper.ShiroResourceMapper;
import sunyu.pojo.ShiroResource;
import sunyu.service.ResourceService;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author 孙宇
 */
@Service("resourceService")
public class ResourceServiceImpl implements ResourceService {

    @Resource
    ShiroResourceMapper shiroResourceMapper;

    @Override
    public List<ShiroResource> select(Map params) {
        return shiroResourceMapper.select(params);
    }

    @Override
    public int deleteByPrimaryKey(String id) {
        return shiroResourceMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(ShiroResource record) {
        return shiroResourceMapper.insert(record);
    }

    @Override
    public int insertSelective(ShiroResource record) {
        return shiroResourceMapper.insertSelective(record);
    }

    @Override
    public ShiroResource selectByPrimaryKey(String id) {
        return shiroResourceMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(ShiroResource record) {
        return shiroResourceMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(ShiroResource record) {
        return shiroResourceMapper.updateByPrimaryKey(record);
    }
}
